// Account.h: interface for the CAccount class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ACCOUNT_H__C60B935B_583A_4BF5_8BB6_1EAC646385A8__INCLUDED_)
#define AFX_ACCOUNT_H__C60B935B_583A_4BF5_8BB6_1EAC646385A8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CIF;
class CSMSQueue;
class CAccount  
{
public:
	CAccount();
	virtual ~CAccount();
public:
	/***********************************************************/	
	std::string m_Password;      //password of account
	std::string m_Flow;          //flow control n Sms/second
	std::string m_PostCode;      //post code of account, used in SGIP
	std::string m_CorporationID; //CorpID of this SP

	unsigned long m_DefaultTON;   //Type of Number 1:International Number 2: National Number
	unsigned long m_DefaultNPI;
	
	unsigned long m_MaxSubmitNum; //The maximum number of submit SMS 
	unsigned long m_SubmitNum;    //How many SMS have been submitted
	unsigned long  m_ulMaxIFNum;  //Max number of IF in this account

	CSMSQueue     m_SMSQueue;     //SMS Queue in this Account 
public:
	BOOL SendOutByIF(CSMSItem* pSMS);
    void SubmitSMS(CSMSItem* pSMS);
public:
	void OnReceive(CSMSItem* pSMS);
	void PeriodDispatch();
	BOOL AddInterface(int protocol, const char *destIP, unsigned short port);
    LOG4CPLUS_CLASS_DECLARE( _s_logger );
};

#endif // !defined(AFX_ACCOUNT_H__C60B935B_583A_4BF5_8BB6_1EAC646385A8__INCLUDED_)
